<?php
define('CASE_NAME', '161226180847');
function startsWith($string, $pattern) { 
      return $pattern === "" || strrpos($string, $pattern, -strlen($string)) !== FALSE;
}
$json = array(); 
if (!startsWith(CASE_NAME, 'http://')) { 
     $ip = "http://192.168.20.236/app/";
    $root = $ip . CASE_NAME ."/game_code_".CASE_NAME. ".zip"; 
    $update = $ip . CASE_NAME; 
    $json["code_url"] = $root; 
    $json["update_url"] = $update;
} else { 
    $json["code_url"] = CASE_NAME; 
    $json["update_url"] = dirname(CASE_NAME);
}
echo(json_encode($json));